package com.javastar.modules.sys.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.javastar.common.result.Result;
import com.javastar.modules.sys.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统用户表 前端控制器
 * </p>
 *
 * @author Java星球
 * @since 2023-07-25
 */
@RestController
@RequestMapping("/modules/sys-user-entity")
@Api(tags = "系统用户")
public class SysUserController {
    @Autowired
    private SysUserService userService;

    @GetMapping("test")
    @ApiOperation(value = "测试")
    @ApiOperationSupport(order = 1)
    @PreAuthorize("hasAuthority('sys:novel:list') and hasAuthority('sys:novel:delete') and hasRole('super_admin')")
    public Result<String> test() {
        return new Result<String>().ok("访问成功");
    }
}
